Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

sort1(nil) -> nil
sort1(cons2(x, y)) -> insert2(x, sort1(y))
insert2(x, nil) -> cons2(x, nil)
insert2(x, cons2(v, w)) -> choose4(x, cons2(v, w), x, v)
choose4(x, cons2(v, w), y, 0) -> cons2(x, cons2(v, w))
choose4(x, cons2(v, w), 0, s1(z)) -> cons2(v, insert2(x, w))
choose4(x, cons2(v, w), s1(y), s1(z)) -> choose4(x, cons2(v, w), y, z)

Q is empty.


QTRS
  ↳ Non-Overlap Check

Q restricted rewrite system:
The TRS R consists of the following rules:

sort1(nil) -> nil
sort1(cons2(x, y)) -> insert2(x, sort1(y))
insert2(x, nil) -> cons2(x, nil)
insert2(x, cons2(v, w)) -> choose4(x, cons2(v, w), x, v)
choose4(x, cons2(v, w), y, 0) -> cons2(x, cons2(v, w))
choose4(x, cons2(v, w), 0, s1(z)) -> cons2(v, insert2(x, w))
choose4(x, cons2(v, w), s1(y), s1(z)) -> choose4(x, cons2(v, w), y, z)

Q is empty.

The TRS is non-overlapping. Hence, we can switch to innermost.

↳ QTRS
  ↳ Non-Overlap Check
QTRS
      ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

sort1(nil) -> nil
sort1(cons2(x, y)) -> insert2(x, sort1(y))
insert2(x, nil) -> cons2(x, nil)
insert2(x, cons2(v, w)) -> choose4(x, cons2(v, w), x, v)
choose4(x, cons2(v, w), y, 0) -> cons2(x, cons2(v, w))
choose4(x, cons2(v, w), 0, s1(z)) -> cons2(v, insert2(x, w))
choose4(x, cons2(v, w), s1(y), s1(z)) -> choose4(x, cons2(v, w), y, z)

The set Q consists of the following terms:

sort1(nil)
sort1(cons2(x0, x1))
insert2(x0, nil)
insert2(x0, cons2(x1, x2))
choose4(x0, cons2(x1, x2), x3, 0)
choose4(x0, cons2(x1, x2), 0, s1(x3))
choose4(x0, cons2(x1, x2), s1(x3), s1(x4))


Using Dependency Pairs [1,13] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

SORT1(cons2(x, y)) -> INSERT2(x, sort1(y))
INSERT2(x, cons2(v, w)) -> CHOOSE4(x, cons2(v, w), x, v)
CHOOSE4(x, cons2(v, w), s1(y), s1(z)) -> CHOOSE4(x, cons2(v, w), y, z)
CHOOSE4(x, cons2(v, w), 0, s1(z)) -> INSERT2(x, w)
SORT1(cons2(x, y)) -> SORT1(y)

The TRS R consists of the following rules:

sort1(nil) -> nil
sort1(cons2(x, y)) -> insert2(x, sort1(y))
insert2(x, nil) -> cons2(x, nil)
insert2(x, cons2(v, w)) -> choose4(x, cons2(v, w), x, v)
choose4(x, cons2(v, w), y, 0) -> cons2(x, cons2(v, w))
choose4(x, cons2(v, w), 0, s1(z)) -> cons2(v, insert2(x, w))
choose4(x, cons2(v, w), s1(y), s1(z)) -> choose4(x, cons2(v, w), y, z)

The set Q consists of the following terms:

sort1(nil)
sort1(cons2(x0, x1))
insert2(x0, nil)
insert2(x0, cons2(x1, x2))
choose4(x0, cons2(x1, x2), x3, 0)
choose4(x0, cons2(x1, x2), 0, s1(x3))
choose4(x0, cons2(x1, x2), s1(x3), s1(x4))

We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ Non-Overlap Check
    ↳ QTRS
      ↳ DependencyPairsProof
QDP
          ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

SORT1(cons2(x, y)) -> INSERT2(x, sort1(y))
INSERT2(x, cons2(v, w)) -> CHOOSE4(x, cons2(v, w), x, v)
CHOOSE4(x, cons2(v, w), s1(y), s1(z)) -> CHOOSE4(x, cons2(v, w), y, z)
CHOOSE4(x, cons2(v, w), 0, s1(z)) -> INSERT2(x, w)
SORT1(cons2(x, y)) -> SORT1(y)

The TRS R consists of the following rules:

sort1(nil) -> nil
sort1(cons2(x, y)) -> insert2(x, sort1(y))
insert2(x, nil) -> cons2(x, nil)
insert2(x, cons2(v, w)) -> choose4(x, cons2(v, w), x, v)
choose4(x, cons2(v, w), y, 0) -> cons2(x, cons2(v, w))
choose4(x, cons2(v, w), 0, s1(z)) -> cons2(v, insert2(x, w))
choose4(x, cons2(v, w), s1(y), s1(z)) -> choose4(x, cons2(v, w), y, z)

The set Q consists of the following terms:

sort1(nil)
sort1(cons2(x0, x1))
insert2(x0, nil)
insert2(x0, cons2(x1, x2))
choose4(x0, cons2(x1, x2), x3, 0)
choose4(x0, cons2(x1, x2), 0, s1(x3))
choose4(x0, cons2(x1, x2), s1(x3), s1(x4))

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 2 SCCs with 1 less node.

↳ QTRS
  ↳ Non-Overlap Check
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
QDP
                ↳ QDPOrderProof
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

INSERT2(x, cons2(v, w)) -> CHOOSE4(x, cons2(v, w), x, v)
CHOOSE4(x, cons2(v, w), s1(y), s1(z)) -> CHOOSE4(x, cons2(v, w), y, z)
CHOOSE4(x, cons2(v, w), 0, s1(z)) -> INSERT2(x, w)

The TRS R consists of the following rules:

sort1(nil) -> nil
sort1(cons2(x, y)) -> insert2(x, sort1(y))
insert2(x, nil) -> cons2(x, nil)
insert2(x, cons2(v, w)) -> choose4(x, cons2(v, w), x, v)
choose4(x, cons2(v, w), y, 0) -> cons2(x, cons2(v, w))
choose4(x, cons2(v, w), 0, s1(z)) -> cons2(v, insert2(x, w))
choose4(x, cons2(v, w), s1(y), s1(z)) -> choose4(x, cons2(v, w), y, z)

The set Q consists of the following terms:

sort1(nil)
sort1(cons2(x0, x1))
insert2(x0, nil)
insert2(x0, cons2(x1, x2))
choose4(x0, cons2(x1, x2), x3, 0)
choose4(x0, cons2(x1, x2), 0, s1(x3))
choose4(x0, cons2(x1, x2), s1(x3), s1(x4))

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be strictly oriented and are deleted.


INSERT2(x, cons2(v, w)) -> CHOOSE4(x, cons2(v, w), x, v)
CHOOSE4(x, cons2(v, w), 0, s1(z)) -> INSERT2(x, w)
The remaining pairs can at least by weakly be oriented.

CHOOSE4(x, cons2(v, w), s1(y), s1(z)) -> CHOOSE4(x, cons2(v, w), y, z)
Used ordering: Combined order from the following AFS and order.
INSERT2(x1, x2)  =  INSERT1(x2)
cons2(x1, x2)  =  cons2(x1, x2)
CHOOSE4(x1, x2, x3, x4)  =  CHOOSE2(x2, x4)
s1(x1)  =  x1
0  =  0

Lexicographic Path Order [19].
Precedence:
cons2 > [INSERT1, 0] > CHOOSE2


The following usable rules [14] were oriented: none



↳ QTRS
  ↳ Non-Overlap Check
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
                ↳ QDPOrderProof
QDP
                    ↳ QDPOrderProof
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

CHOOSE4(x, cons2(v, w), s1(y), s1(z)) -> CHOOSE4(x, cons2(v, w), y, z)

The TRS R consists of the following rules:

sort1(nil) -> nil
sort1(cons2(x, y)) -> insert2(x, sort1(y))
insert2(x, nil) -> cons2(x, nil)
insert2(x, cons2(v, w)) -> choose4(x, cons2(v, w), x, v)
choose4(x, cons2(v, w), y, 0) -> cons2(x, cons2(v, w))
choose4(x, cons2(v, w), 0, s1(z)) -> cons2(v, insert2(x, w))
choose4(x, cons2(v, w), s1(y), s1(z)) -> choose4(x, cons2(v, w), y, z)

The set Q consists of the following terms:

sort1(nil)
sort1(cons2(x0, x1))
insert2(x0, nil)
insert2(x0, cons2(x1, x2))
choose4(x0, cons2(x1, x2), x3, 0)
choose4(x0, cons2(x1, x2), 0, s1(x3))
choose4(x0, cons2(x1, x2), s1(x3), s1(x4))

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be strictly oriented and are deleted.


CHOOSE4(x, cons2(v, w), s1(y), s1(z)) -> CHOOSE4(x, cons2(v, w), y, z)
The remaining pairs can at least by weakly be oriented.
none
Used ordering: Combined order from the following AFS and order.
CHOOSE4(x1, x2, x3, x4)  =  CHOOSE3(x1, x2, x3)
cons2(x1, x2)  =  cons
s1(x1)  =  s1(x1)

Lexicographic Path Order [19].
Precedence:
[cons, s1] > CHOOSE3


The following usable rules [14] were oriented: none



↳ QTRS
  ↳ Non-Overlap Check
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
                ↳ QDPOrderProof
                  ↳ QDP
                    ↳ QDPOrderProof
QDP
                        ↳ PisEmptyProof
              ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

sort1(nil) -> nil
sort1(cons2(x, y)) -> insert2(x, sort1(y))
insert2(x, nil) -> cons2(x, nil)
insert2(x, cons2(v, w)) -> choose4(x, cons2(v, w), x, v)
choose4(x, cons2(v, w), y, 0) -> cons2(x, cons2(v, w))
choose4(x, cons2(v, w), 0, s1(z)) -> cons2(v, insert2(x, w))
choose4(x, cons2(v, w), s1(y), s1(z)) -> choose4(x, cons2(v, w), y, z)

The set Q consists of the following terms:

sort1(nil)
sort1(cons2(x0, x1))
insert2(x0, nil)
insert2(x0, cons2(x1, x2))
choose4(x0, cons2(x1, x2), x3, 0)
choose4(x0, cons2(x1, x2), 0, s1(x3))
choose4(x0, cons2(x1, x2), s1(x3), s1(x4))

We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ Non-Overlap Check
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
QDP
                ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

SORT1(cons2(x, y)) -> SORT1(y)

The TRS R consists of the following rules:

sort1(nil) -> nil
sort1(cons2(x, y)) -> insert2(x, sort1(y))
insert2(x, nil) -> cons2(x, nil)
insert2(x, cons2(v, w)) -> choose4(x, cons2(v, w), x, v)
choose4(x, cons2(v, w), y, 0) -> cons2(x, cons2(v, w))
choose4(x, cons2(v, w), 0, s1(z)) -> cons2(v, insert2(x, w))
choose4(x, cons2(v, w), s1(y), s1(z)) -> choose4(x, cons2(v, w), y, z)

The set Q consists of the following terms:

sort1(nil)
sort1(cons2(x0, x1))
insert2(x0, nil)
insert2(x0, cons2(x1, x2))
choose4(x0, cons2(x1, x2), x3, 0)
choose4(x0, cons2(x1, x2), 0, s1(x3))
choose4(x0, cons2(x1, x2), s1(x3), s1(x4))

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be strictly oriented and are deleted.


SORT1(cons2(x, y)) -> SORT1(y)
The remaining pairs can at least by weakly be oriented.
none
Used ordering: Combined order from the following AFS and order.
SORT1(x1)  =  SORT1(x1)
cons2(x1, x2)  =  cons2(x1, x2)

Lexicographic Path Order [19].
Precedence:
cons2 > SORT1


The following usable rules [14] were oriented: none



↳ QTRS
  ↳ Non-Overlap Check
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ QDPOrderProof
QDP
                    ↳ PisEmptyProof

Q DP problem:
P is empty.
The TRS R consists of the following rules:

sort1(nil) -> nil
sort1(cons2(x, y)) -> insert2(x, sort1(y))
insert2(x, nil) -> cons2(x, nil)
insert2(x, cons2(v, w)) -> choose4(x, cons2(v, w), x, v)
choose4(x, cons2(v, w), y, 0) -> cons2(x, cons2(v, w))
choose4(x, cons2(v, w), 0, s1(z)) -> cons2(v, insert2(x, w))
choose4(x, cons2(v, w), s1(y), s1(z)) -> choose4(x, cons2(v, w), y, z)

The set Q consists of the following terms:

sort1(nil)
sort1(cons2(x0, x1))
insert2(x0, nil)
insert2(x0, cons2(x1, x2))
choose4(x0, cons2(x1, x2), x3, 0)
choose4(x0, cons2(x1, x2), 0, s1(x3))
choose4(x0, cons2(x1, x2), s1(x3), s1(x4))

We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.